package hcs.core.domain.utils;

import com.alibaba.fastjson.JSONObject;

import java.util.ArrayList;
import java.util.List;

public class RPageUtils<T> {

    public List<T> analysis(PageUtils pageUtils, Class<T> clazz) {
        List<T> result = new ArrayList<>();
        for (Object o :pageUtils.getList()) {
            T t = JSONObject.parseObject(JSONObject.toJSONString(o), clazz);
            result.add(t);
        }
        return result;
    }
}
